////////////////////////////////////////////////////////////////////////////////
// Filename: sunsystemclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _SUNSYSTEM_H_
#define _SUNSYSTEM_H_


//////////////
// INCLUDES //
//////////////
#include <d3dx10math.h>
#include "beziercurve.h"
#include "modelclass.h"
#include "timerclass.h"
#include "planetmodels.h"
////////////////////////////////////////////////////////////////////////////////
// Class name: sunsystemclass
////////////////////////////////////////////////////////////////////////////////
class Sunsystem
{
public:
	Sunsystem();
	~Sunsystem();
	bool initialize(HWND hwnd, D3DClass* m_D3D);
	void Render();
	int getModelCount();
	D3DXVECTOR4 getSunColor();
	float getSunScale();
	float getPlanetScale(int);
	void getPlanetrotation(int planetnumber, D3DXMATRIX &rotation);
	void getPlanetposition(float &positionX, float &positionY, float &positionZ, int planetnumber);
	void frame();
	ModelClass *getModel(int planetnumber);
private:
	static Planetmodels pmodels;
	struct ModelInfoType
	{
		float distanceToSun;
		float stepdifference;
		float bezierstep;
		float scale;
		ModelClass* model;
		float rX;
		float currentRX;
		float rY;
		float currentRY;
		float rZ;
		float currentRZ;
		D3DXMATRIX rotation;
	};
	struct SunInfoType {
		float scale;
		D3DXVECTOR4 color;
	}suninfo;
	int m_modelCount;
	float bezierstep;
	int maxSteps;
	ModelInfoType* m_ModelInfoList;
	Beziercurve beziercurve;
	TimerClass timer;
};

#endif